package com.testmanager.testmananger.quantitative.service;

import com.testmanager.testmananger.foundation.dto.ConstantDto;
import com.testmanager.testmananger.foundation.mapper.ConstantMapper;
import com.testmanager.testmananger.quantitative.constants.*;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@Service
@Slf4j
public class ConstantInfoService {

    public List<ConstantDto> getDemandType(){
        List<ConstantDto> result = new ArrayList<>();
        Arrays.stream(DemandType.values())
                .forEach(t -> result.add(ConstantMapper.toConstantDto(t)));
        return result;
    }

    public List<ConstantDto> getIterationStatus(){
        List<ConstantDto> result = new ArrayList<>();
        Arrays.stream(IterationStatus.values())
                .forEach(t -> result.add(ConstantMapper.toConstantDto(t)));

        return result;
    }

    public List<ConstantDto> getBugStatus(){
        List<ConstantDto> result = new ArrayList<>();
        Arrays.stream(BugStatus.values())
                .forEach(t -> result.add(ConstantMapper.toConstantDto(t)));

        return result;
    }
    public List<ConstantDto> getBugSearchStatus(){
        List<ConstantDto> result = new ArrayList<>();
        Arrays.stream(BugSearchStatus.values())
                .forEach(t -> result.add(ConstantMapper.toConstantDto(t)));

        return result;
    }
    public List<ConstantDto> getBugLevel(){
        List<ConstantDto> result = new ArrayList<>();
        Arrays.stream(BugLevel.values())
                .forEach(t -> result.add(ConstantMapper.toConstantDto(t)));

        return result;
    }


}
